package com.jk.mapper;

import com.jk.entity.Identity;
import com.jk.entity.Shop;
import com.jk.entity.ShopCar;
import com.jk.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 周慧茹
 * 创建时间 2018/4/11  19:49
 * 邮箱 960297232@qq.com
 */
public interface ShoppingCarMapper {


    @Select("select  userid,username,userpass  from  t_user  where  userid  ='0f1c5f77322c11e8ad7d00163e32bd1a'")
    User querycertifId();


    @Select("select  * from  i_identity  y where  y.userid=#{userid}")
    Identity getuseridByidentity(String userid);

    @Select("select  *  from t_shopcar  where shopid = #{shopid}")
    ShopCar queryShopByShopid(String shopid);

    @Select("select count(*) from  t_shopcar  limit #{offset},#{limit}")
    long getShopCarSum(@Param("offset") Integer offset, @Param("limit") Integer limit);

   @Select("select * from  t_shopcar  limit #{offset},#{limit}")
    List<ShopCar> getShopCarList(@Param("offset") Integer offset, @Param("limit") Integer limit);


    @Select("select shopinfo from  t_shopcar  where shopid=#{shopid}")
    String quercommodityByid(String shopid);

    @Select("select mincount  from  t_shopcar   where shopid =#{shopid}")
    Integer getShopCountMin(String shopid);
}

